ExpressionFormula

Ecng.Compilation.Expressions

Compiled mathematical formula.

Konstruktoren

ExpressionFormula
protected ExpressionFormula(string expression, IEnumerable<string> variables)
expressionFormula = ExpressionFormula(expression, variables)

Initializes a new instance of the ExpressionFormula.

expression
Mathematical formula.
variables
Variables.

Eigenschaften

Error
public string Error { get; }
value = expressionFormula.Error

Compilation error.

Expression
public string Expression { get; }
value = expressionFormula.Expression

Mathematical formula.

Variables
public IEnumerable<string> Variables { get; }
value = expressionFormula.Variables

Variables.

Methoden

Calculate
public abstract TResult Calculate(decimal[] values)
result = expressionFormula.Calculate(values)

To calculate the basket value.

values
Inner values.

Rückgabe: The basket value.

CreateError
public static ExpressionFormula<TResult> CreateError(string errorText)
result = ExpressionFormula.CreateError(errorText)

Create a error stub.

errorText
The error text.

Rückgabe: The stub.

ToString
public override string ToString()
result = expressionFormula.ToString()

Returns a string representation of the tuple, with values separated by commas.

Rückgabe: A string representing the tuple's values.